package com.elysia.adminservice.feign;

import com.elysia.adminservice.domain.dto.GameNewsDTO;
import com.elysia.adminservice.domain.dto.GameStatisticDTO;
import com.elysia.adminservice.domain.dto.UpdateLogDTO;
import com.elysia.adminservice.domain.vo.GameNewsVO;
import com.elysia.adminservice.domain.vo.GameStatisticVO;
import com.elysia.adminservice.domain.vo.UpdateLogTotalVO;
import com.elysia.adminservice.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "news-service")
public interface NewsFeignClient {
    @GetMapping("/update-log/all")
    Result<UpdateLogTotalVO> getAllUpdateLogs();
    @PostMapping("/update-log")
    Result<UpdateLogTotalVO> addUpdateLog(@RequestBody UpdateLogDTO updateLogDTO);
    @GetMapping("/game-statistic/all")
    Result<List<GameStatisticVO>> getAllGameStatistics();
    @PostMapping("/game-statistic")
    Result<List<GameStatisticVO>> addGameStatistic(@RequestBody GameStatisticDTO gameStatisticDTO);
    @PutMapping("/game-statistic")
    Result<List<GameStatisticVO>> updateGameStatistic(@RequestBody GameStatisticDTO gameStatisticDTO);
    @PostMapping("/game-news")
    Result<GameNewsVO> addGameNews(@RequestBody GameNewsDTO gameNewsDTO);
    @GetMapping("/game-news")
    Result<List<GameNewsVO>> getAllGameNews();
    @PutMapping("/game-news/{id}")
    Result<GameNewsVO> updateGameNews(@PathVariable long id,  @RequestBody GameNewsDTO gameNewsDTO);
}
